﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class LoginByAjax : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string result = "-1";
        string uName = Request.Form["un"];
        string uPwd = Request.Form["up"];
        if (!string.IsNullOrEmpty(uName)&&!string.IsNullOrEmpty(uPwd))
        {
            System.Threading.Thread.Sleep(3000);
            MODEL.Students model = new BLL.Students().Login(uName,uPwd);
            if (model != null)
            {
                result = "1";
                Session["uInfo"]=model.SID;
            }
            Response.Write(result);
            Response.End();
        }
    }
}